/**
* @file 操作表
* @author 周晔晗
* @date 16/11/10
*/
<template>
  <div>
    <div id="picture"
         class="mui-popover mui-popover-action mui-popover-bottom"
         :class="[active?'mui-active':'']">
      <ul class="mui-table-view">
        <li v-for=" item in actionNames" class="mui-table-view-cell">
          <a  @tap="action($index)">{{item.title}}</a>
        </li>
      </ul>
      <ul class="mui-table-view">
        <li class="mui-table-view-cell" @tap="cancel">
          <a>取消</a>
        </li>
      </ul>
    </div>
    <div><opm-backdrop :active="active"></opm-backdrop></div>
  </div>
</template>
<script>
  import backdrop from 'src/public/components/backdrop.vue';
  export default{
    components: {
      'opm-backdrop': backdrop
    },
    props: {
      actionNames: {
        type: Array
      },
      active: {
        type: Boolean,
        default: false
      }
    },
    methods: {
      cancel: function () {
        this.$emit('cancel');
      },
      action: function (index) {
        this.$emit('action', index);
      }
    }
  };
</script>
